package com.chiu.cblog;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
 * Author zhouqing.qiu
 * Date 15-12-4
 * Tel +86 17091429758
 * Email zhouqing.qiu@reallytek.com
 * Group ReallyTek SW1 System Team
 */
public class HomeFragment extends Fragment {

    private Toolbar mToolBar;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.home, null);

        mToolBar = (Toolbar) view.findViewById(R.id.toolbar);

        if (mToolBar != null) {
            Log.i("qzq", "ToolBar != null");
        } else {
            Log.i("qzq", "ToolBar == null");
        }

        /*ListView list = (ListView) view.findViewById(R.id.list);

        List<String> items = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
            items.add(i, "item : " + i);
        }

        list.setAdapter(new ArrayAdapter<String>(getContext(), android.R.layout.simple_list_item_1, items));*/

        return view;
    }

    public Toolbar getToolBar() {
        return mToolBar;
    }
}
